<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSchedulesTable extends Migration
{
    /**
     * Run the migrations.
     * 员工排班表
     * @return void
     */
    public function up()
    {
        Schema::create('schedules', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('store_id')->index()->comment('门店id');
            $table->integer('import_time')->index()->comment('导入年月时间戳');
            $table->string('staff_no', '16')->index()->comment('员工工号');
            $table->string('name', '16')->index()->comment('员工姓名');
            $table->string('department', '20')->index()->comment('所属部门');
            $table->integer('one')->comment('1日');
            $table->integer('two')->comment('2日');
            $table->integer('three')->comment('3日');
            $table->integer('four')->comment('4日');
            $table->integer('five')->comment('5日');
            $table->integer('six')->comment('6日');
            $table->integer('seven')->comment('7日');
            $table->integer('eight')->comment('8日');
            $table->integer('nine')->comment('9日');
            $table->integer('ten')->comment('10日');
            $table->integer('eleven')->comment('11日');
            $table->integer('twelve')->comment('12日');
            $table->integer('thirteen')->comment('13日');
            $table->integer('fourteen')->comment('14日');
            $table->integer('fifteen')->comment('15日');
            $table->integer('sixteen')->comment('16日');
            $table->integer('seventeen')->comment('17日');
            $table->integer('eighteen')->comment('18日');
            $table->integer('nineteen')->comment('19日');
            $table->integer('twenty')->comment('20日');
            $table->integer('twenty_one')->comment('21日');
            $table->integer('twenty_two')->comment('22日');
            $table->integer('twenty_three')->comment('23日');
            $table->integer('twenty_four')->comment('24日');
            $table->integer('twenty_five')->comment('25日');
            $table->integer('twenty_six')->comment('26日');
            $table->integer('twenty_seven')->comment('27日');
            $table->integer('twenty_eight')->comment('28日');
            $table->integer('twenty_nine')->comment('29日');
            $table->integer('thirty')->comment('30日');
            $table->integer('thirty_one')->comment('31日');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('scheduling');
    }
}
